package consts

const (
	JwtKey            = "1234565fsfdfsdfdsfasds"
	TokenName         = "Authorization"
	TokenPrefix       = "Bearer "
	SuperAdminAuthKey = "admin"
	DefaultPageNum    = 1
	DefaultPageSize   = 10
	UserInfoKey       = "userInfo"
	// 不需要登录的接口标签
	AuthNoLoginKey = "noLogin"
	// 不需要权限的接口标签
	AuthNoPermKey = "noPerm"
	AuthPermKey   = "perm"
	AuthPermMode  = "mode"
)

// 不需要登录的接口
var WhiteList = []string{
	"/sys/login",
	"/sys/logout",
	"/sys/getCaptchaOpenFlag",
}

// 忽略权限拦截的接口
var IgnoreAuthList = []string{
	"/sys/user/info",
	"/sys/user/permCode",
	"/*/*/select",
	"/sys/dict/getByDictType",
	"/sys/menu/appList",
}

// 权限映射关系
var AuthMap = map[string]map[string]string{
	// "/sys/rbac/roleMenuIds": {
	// 	"value": "sys:rbac:roleMenuIds,sys:rbac:saveRoleMenu",
	// 	"mode":  "or",
	// },
}

/**
或者使用perm和mode 字段来控制权限
	type RoleMenuIdsReq struct {
	g.Meta `path:"/sys/rbac/roleMenuIds" tags:"RBAC管理" method:"post" summary:"获取角色菜单关联ID" perm:"sys:rbac:roleMenuIds,sys:rbac:saveRoleMenu" mode:"or"`
	RoleId string `json:"roleId" dc:"角色ID" v:"required#请输入角色ID"`
}
*/
